﻿@model List<StripeDemo.Models.Customer>

@{
    ViewBag.Title = "ListAllCustomer";
}

<h2>ListAllCustomer</h2>
@Html.ActionLink("CreateCustomer", "CreateCustomer")
<table class="table">
    <tr>
        <th>Customer ID</th>
        <th>Fullname</th>
        <th>Billing Address</th>
        <th>Phone Number</th>
        <th>Email</th>
        <th>Extra Customer Info</th>
        <th></th>
    </tr>
    @foreach (var item in Model)
    {
        <tr>
            <td>@item.CustomerId</td>
            <td>@item.FullName</td>
            <td>@item.BillingAddress</td>
            <td>@item.PhoneNumber</td>
            <td>@item.Email</td>
            <td>@item.ExtraCustomerInfo</td>
            <td>
                @Html.ActionLink("Edit", "Edit", new { id = item.CustomerId }) |
                @Html.ActionLink("Delete", "Delete", new { id = item.CustomerId }, new
           {
               onclick = "return confirm('Are you sure you want to delete this Customer?');"
           })
            </td>
        </tr>

    }

</table>